The app can send sequences of key presses in response to voice command or a button / key press. These can be used for anything you like, but their primary function is to ease the pain of navigating the awkward in-game pit menus. The app comes with a default set of command macros which for AMS2, iRacing, PCars2 and Raceroom. The default commands can be found in [install folder]/saved_command_macros.json. The app includes a macro edit function which allows existing macros to be customised and new ones created. This will create a file Documents/CrewChiefV4/save_commands_macros.json with the macros you've modified or created, and will override the default file.

Because macros are pretty simple (sending a pre-defined sequence of keys) you need to ensure the in-game key bindings match what the macro is expecting.

Raceroom

Expected in-game key bindings:
Pit Menu Toggle Q
Pit Menu Select E
Pit Menu Up
W
Pit Menu Down S
Pit Menu Decrease A
Pit Menu Increase D
Pit Request Toggle R
Real-time Chat C


You can request a pit stop by saying "pit request", "in this lap" or "box this lap". This will open the pit menu, select 'pit request' and close it again after a few seconds' delay (so you can see what's selected).

You can also cycle pit presets with the voice commands "next strategy", "next pit preset", "previous strategy", "previous pit preset".

If you want to manually navigate the pit menu with voice commands, use "pit menu toggle", "pit menu up", "pit menu down", "pit menu left", "pit menu right" and "pit menu select".

There are more sophisticated macros that can handle refuelling ("fuel to the end" and "add fuel, X litres"). They work by moving the pit menu to the fuel item, de-selecting 'fuel' and then changing the amount to zero by pressing 'Pit menu Decrease' many (about 100) times. They then press 'Pit menu Increase' the correct number of times to set the required (or calculated) fuel amount. Because many key presses are sent in quick succession, some users my encounter issues with these macros (but I've not had any problems myself) - it takes a few seconds to complete these macros to ensure you do them in plenty of time, before you reach the pit lane.


PCars2

Expected in-game key bindings:
Pit Request Toggle Q
Car Management E
ICM Menu Up W
ICM Menu Down S
ICM Menu Left A
ICM Menu Right D
In-game Chat Box T

You can request a pit stop by saying "pit request", "in this lap" or "box this lap". This will open the pit menu, select 'pit request' and close it again.

In pCars 2, you can select strategies with the voice commands "strategy one" / "strat one", up to "strategy four" / "strat four". In R3E you can cycle through pit presets with "next strategy" / "next pit preset" and "previous strategy", "previous pit preset".

If you want to manually navigate the pit menu with voice commands, use "pit menu toggle", "pit menu up", "pit menu down", "pit menu left" and "pit menu right".

iRacing

Expected in-game key bindings:
Lap Timing Black Box F1
Standings Black Box F2
Relative Black Box F3
Fuel Black Box F4
Tires Black Box F5
Tire Info Black Box F6
Pit-stop Adjustments Black Box F7
In-car Adjustments Black Box F8
Mirror Adjustments Black Box F9
Radio Adjustments Black Box F10
Select Next Control UP
Select Previous Control DOWN
Increment Selected Control RIGHT
Decrement Selected Control LEFT
Toggle Selected Control SPACE

You can change the black boxes by saying one of the following commands: "black box lap time", "black box standings", "black box relative",
"black box fuel", "black box tires", "black box tire info", "black box pit stop", "black box car", "black box mirror" or "black box radio"

You can navigate them by saying one of the following commands: "menu next", "menu previous", "menu increase", "menu decrease" or "menu toggle"


Advanced command macros

As you can see from the previous section, key press macros are fiddly and a bit dumb - the app has only limited knowledge of what state the pit menu is in so it has to either make assumptions or work quite hard to put the menu into a known state.

There are 2 macros for adding fuel. One uses the logic of the app's 'Fuel' event to calculate how much fuel is needed to finish the race ("fuel to the end" voice command), the other uses the amount of fuel requested in the voice command ("add fuel, 100 litres" or whatever). These macros opens the pit menu, navigate to the fuel option and attempt to reset it to zero litres. Because they can't know how much fuel might already be set on this menu they have to press the 'decrease' button lots (150) times. This ensure it's at zero before they then add the calculated or requested amount of fuel.

*Note that these will only work correctly if you use Litres as your unit.

Another point to note here is that these fuelling macros press 'decrease' 150 times quite quickly to ensure the fuel amount is zero before they start increasing it. When things are configured correctly it works well, but it's a lot of key presses and if something goes wrong the end result may be undesirable.

The macro feature can also be used to automate chat messages. There are examples for pCars2 and R3E. Again, these just send sequences of key presses.

There are a few special key press commands in the macro editor screen to help ease the pain of wiring these things up:

 - To send a fixed number of multiple key presses use "{MULTIPLE,153}KEY_A" (presses the A key 153 times).
 - To send a number of multiple key presses based on some app logic for example, use "{MULTIPLE,fuel}KEY_D" (presses D however many times the Fuel event told it to). This requires specific application code to work but I'm happy to take requests :).
 - To send a number of multiple presses based on the voice command that triggered the macro, the voice command needs to use a special format with the number range to recognise in curly braces - e.g. "add fuel, {1,150} litres" (recognises "add fuel 0 litres" up to "add fuel 150 litres", in steps of 1). Use "{MULTIPLE,VOICE_TRIGGER}KEY_D" to press (in this example) D the number of times recognised in the voice command.
 - To send a sequence of key presses from some free text, use "{FREE_TEXT}sorry, my bad". Each of the keys after {FREE_TEXT} will be pressed in sequence. Only letters, commas, hypens and full-stops are supported. This is to make chat macros more straightforward (e.g. ["Real-time Chat", "{FREE_TEXT}good pass", "ENTER"]).

Hopefully the game devs will make these menus or the actions they trigger easier to use for 3rd party apps. But until they do, these complicated automated interactions are always going to be flaky.



Raceroom Pit Menu Interactions

R3E exposes some additional information describing the state of the popup pit menu - I use this where I can to make the macros a little more reliable. The app is also able to navigate the menu by pressing sequences of key to make specific pit requests. This depends on the in-game key bindings matching the keys set up in the app's command macros. By default, these macros require the in-game pit menu actions to be bound to W (menu up), A (menu left / decrease), S (menu down), D (menu right / increase), Q (menu toggle), E (menu select) and R (request pit). It uses the menu navigation command macros (single button presses to move the cursor) to locate and select the approprate commands for most actions like selecting / deselecting tyres and repairs. Choosing a refuelling amount is not possible with this new approach - it still relies on the auto fuelling macros. The commands which use this new approach are:

"pitstop clear tyres" / "pitstop don't change tyres" / "box, clear tyres" / "box, don't change tyres"
"pitstop change all tyres" / "box, change all tyres"
"pitstop change front tyres only" / "box, change front tyres only"
"pitstop change rear tyres only" / "box, change rear tyres only"
"pitstop fix front aero only" / "box, fix front aero only"
"pitstop fix rear aero only" / "box, fix rear aero only"
"pitstop fix all aero" / "box, fix all aero"
"pitstop don't fix aero" / "box, don't fix aero"
"pitstop fix suspension" / "box, fix suspension"
"pitstop don't fix suspension" / "box, don't fix suspension"
"pitstop serve penalty" / "box, serve penalty"
"pitstop don't serve penalty" / "box, don't serve penalty"
"pitstop refuel" / "box, refuel"
"pitstop don't refuel" / "box, don't refuel"
"what are the pit actions" / "what's the pitstop plan" (reports the selected actions for the next pitstop)

The app will also read out the planned pit actions automatially when you get near the pit entrance after requesting a stop.




Crew Chief Forum

Discord channel